import VueI18n from 'vue-i18n'
import Vue from 'vue'
import Cookie from 'js-cookie'
import ElementZH from 'element-ui/lib/locale/lang/zh-CN'// 引入中文语言包
import ElementEN from 'element-ui/lib/locale/lang/en'// 引入英文语音包
import customZH from './zh'
import customEN from './en'

Vue.use(VueI18n)

export default new VueI18n({
  locale: Cookie.get('language') || 'en', // 指的是当前多语言的类型，随意定义的字符串
  messages: {
    zh: {
      ...ElementZH,
      ...customZH
    },
    en: {
      ...ElementEN,
      ...customEN
    }
  }
})
